package com.cskaoyan.controller;

import com.cskaoyan.bean.AdminListRespVo;
import com.cskaoyan.bean.RegionListBean;
import com.cskaoyan.service.RegionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @USER: cuiweiguo#
 * @DATE: 2022/5/6
 * @TIME: 22:37
 * @PROJECT_NAME: mallproject2
 */
@RestController
@RequestMapping("admin/region")
public class RegionController {

    @Autowired
    RegionService regionService;

    ///admin/region/list
    //GET http://182.92.235.201:8083/admin/region/list HTTP/1.1
    //list
    @GetMapping("list")
    public AdminListRespVo<RegionListBean> list() {
        RegionListBean regionListBean = regionService.list();
        return AdminListRespVo.listOk(regionListBean);
    }
}
